package com.sunday.common.mq.kafka.study.spring.e14_Handler_Method_Argument_Resolver;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.kafka.config.TopicBuilder;

/**
 * https://docs.spring.io/spring-kafka/docs/current/reference/html/#custom-arg-resolve
 */
@Slf4j
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Bean
    public NewTopic topic10() {
        return TopicBuilder.name("topic10")
                .partitions(3)
                .replicas(1)
                .build();
    }

}
